<template>
    <el-container>
        <el-main class="nopadding">
            <el-table :data="data['威大月']" border style="width: 100%;margin-bottom: 32px">
                <el-table-column label="威大月" prop="年份" align="center" width="150"></el-table-column>
                <el-table-column v-for="(item, index) in month" :key="index" :label="item" align="center">
                    <template #default="{row}">
                        {{row[item]}}
                    </template>
                </el-table-column>
            </el-table>
            <el-table :data="data['威大季']" border style="width: 100%;margin-bottom: 32px">
                <el-table-column label="威大季" prop="年份" align="center" width="150"></el-table-column>
                <el-table-column v-for="(item, index) in quarter" :key="index" :label="item" align="center">
                    <template #default="{row}">
                        {{row[item]}}
                    </template>
                </el-table-column>
            </el-table>
            <el-table :data="data['威大年']" border style="width: 100%;margin-bottom: 32px">
                <el-table-column label="威大年" prop="年份" align="center" width="150"></el-table-column>
                <el-table-column label="威大年" prop="全年合计" align="center"></el-table-column>
                <!-- <el-table-column v-for="(item, index) in quarter" :key="index" :label="item" align="center" width="120">
                    <template #default="{row}">
                        {{row[item]}}
                    </template>
                </el-table-column> -->
            </el-table>
        </el-main>
    </el-container>
</template>

<script>

export default {
    name: '采购计划管理',
    data() {
        return {
            data: [],
            month: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
            quarter: ['一季度','二季度','三季度','四季度']
        }
    },
    mounted() {
		// this.getArea();
        this.getData();
    },
    methods: {
        async getData() { 
            var res = await this.$API.business.sale.detail_static.post(this.search);
            if (res.code == 1) {
                this.data = res.data;
            }
        },
    },
}
</script>

<style></style>
